﻿@using SCMS.Resources
@{
    ViewBag.Title = Resources_frank.MasterBudget_MBCIndex_MBCategories + " - " + Resources_frank.Global_String_SupplyChainManagementSystem;
    Layout = "~/Views/Shared/_GeneralLayout.cshtml";
}

<div id="budgetsMain" class="contentMain">
    <div class="contentHeader">
        <div class="headerText">
            <h3 class="title-left">@Resources_frank.MasterBudget_MBCIndex_MBCategories</h3>
        </div>
        <div style="font-size: 13px; text-align: left;">
            <table cellpadding="0" cellspacing="0">
                <tr>
                    @if (UserContext.HasPermission(StandardPermissionProvider.MasterBudgetCategoriesManage))
                    {
                        <td class="arrowLink">
                            @Ajax.ActionLink(Resources_frank.Global_String_AddNew, "MBCIndex", new { id = "CreateCategory" }, new AjaxOptions
                            {
                                OnBegin = string.Format("ShowDialogue('{0}')", Resources_frank.MasterBudget_MBCIndex_NewMBCategory),
                                UpdateTargetId = "popup-page",
                                LoadingElementId = "popup-loading",
                                Url = Url.Action("CreateCategory/" + ViewBag.Id)
                            })
                        </td>
                    }
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>            
        </div>
    </div>
    <br />
    <div id="loading" style="display:none; color:Blue; font-weight: bold;">
        <img src="../../Content/images/loading_indicator.gif" alt="@Resources_frank.Global_String_Processing" />
    </div>
    <div id="budgetDiv">
        <!-- Content goes here-->
        @Html.Action("MBCategories")
    </div>
</div>